<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:composite="http://java.sun.com/jsf/composite">
	
	<composite:interface name="busTypeViewBox" 
						 displayName="BusType ViewBox"
						 shortDescription="This component provide a quick way to explorer all BusType">
	</composite:interface>
	
	<composite:implementation>
			<h:form id="busTypeViewBox" prependId="false">
				<fieldset>
					<p><h:message for="busTypeViewBox"></h:message></p>
					
					<ol>
						<li>
							<f:ajax event="valueChange" immediate="true" render="@form">
							<h:outputLabel for="selectControl" value="Select a bus type: "></h:outputLabel>
								<h:selectOneMenu id="selectControl"
												 converter="#{busTypeViewBox}"
												 valueChangeListener="#{busTypeViewBox.selectChanged}">
									<f:selectItems value="#{busTypeViewBox.busTypes}"></f:selectItems>
								</h:selectOneMenu>
							</f:ajax>
						</li>
						
						<li>
						<h:outputLabel for="typeName" value="Type Name: "></h:outputLabel>
						<h:inputText id="typeName" readonly="true" binding="#{busTypeViewBox.typeNameInput}"></h:inputText>
						</li>
						
						<li>
						<h:outputLabel for="seatType" value="Seat Type: "></h:outputLabel>
						<h:inputText id="seatType" readonly="true" binding="#{busTypeViewBox.seatTypeInput}"></h:inputText>
						</li>
						
						<li>
						<h:outputLabel for="seatCount" value="Seat Count: " ></h:outputLabel>
						<h:inputText id="seatCount" readonly="true" binding="#{busTypeViewBox.seatCountInput}"></h:inputText>
						</li>
					</ol>
				</fieldset>			
			</h:form>
	</composite:implementation>
</html>